import React from 'react'
import style from './modalWindow.module.scss'
import { Modal } from 'antd'
import { useAppSelector } from '../../../starter/hooks/redux'
import { useActions } from '../../../starter/hooks/actions'

type IModalWindow = {

}

export default function ModalWindow ({}:IModalWindow) {
  const {title, content, footer, isShow} = useAppSelector(state => state.modal)
  const {onShowModal} = useActions()
  return (
        <Modal title={title}
               open={isShow}
               footer={footer}
               onCancel={() => onShowModal(false)}
        >
          {content}
        </Modal>
    )

}
